<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common.jsp" %>
<form id="treeForm1" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath }/drp/drpProductType/list" method="post"></form>
<div class="pageContent" style="padding: 5px">
	<div class="tabs">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li>
						<a href="javascript:;">
							<span>商品类型列表</span>
						</a>
					</li>
				</ul>
			</div>
		</div>
		<div class="tabsContent">
			<div>
				<div class="panelBar" style="width: 262px">
					<ul class="toolBar">
						<li>
							<shiro:hasPermission name="drp/drpProductType/add">
								<a id="addMenu" class="add" href="${pageContext.request.contextPath}/drp/drpProductType/addUI" 
									target="dialog" mask="true" rel="input" width="600" height="400" title="添加">
									<span>添加</span>
								</a>
							</shiro:hasPermission>
						</li>
						<li>
							<shiro:hasPermission name="drp/drpProductType/delete">
								<a id="delMenu" class="delete" href="${pageContext.request.contextPath}/drp/drpProductType/delete" 
									callback="navTabAjax" target="ajaxTodo" rel="inputMenu" title="确定执行该删除操作吗？">
									<span>删除</span>
								</a>
							</shiro:hasPermission>
						</li>
						<li>
							<a id="updateMenu" class="edit" href="javascript:onscreach();">
								<span>刷新</span>
							</a>
						</li>
					</ul>
				</div>
				<div layoutH="78" style="float: left; display: block; overflow: auto; width: 260px; border: solid 1px #CCC; line-height: 21px; background: #fff">${tree}</div>
				<div layoutH="78" id="jbsxBox" class="unitBox" style="margin-left: 266px;"></div>
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>
<script type="text/javascript">
	function onClickMenuNode(id) {
		$("#"+id).attr("href","${pageContext.request.contextPath}/drp/drpProductType/editUI?id=" + id);
		$("#addMenu").attr("href", "${pageContext.request.contextPath}/drp/drpProductType/addUI?pid=" + id);
		$("#delMenu").attr("href", "${pageContext.request.contextPath}/drp/drpProductType/delete?id=" + id);
	}
	function onscreach() {
		$("#treeForm1").submit();
	}
	// 删除后的回调函数，刷新树形菜单
	function navTabAjax(json) {
		//navTabAjaxDone(json);
		navTab.reload();
	}
</script>